import request from '@/utils/request'

// 查询我要选课列表
export function listStudentCourse(query) {
  return request({
    url: '/studentCourse/studentCourse/list',
    method: 'get',
    params: query
  })
}
//查询所有老师
export function listTeacher() {
  return request({
    url: '/studentCourse/studentCourse/teacherList',
    method: 'get',
    params: {}
  })
}
// 查询我要选课详细
export function getStudentCourse(id) {
  return request({
    url: '/studentCourse/studentCourse/' + id,
    method: 'get'
  })
}

// 新增我要选课
export function addStudentCourse(data) {
  return request({
    url: '/studentCourse/studentCourse',
    method: 'post',
    data: data
  })
}

// 修改我要选课【选课】
export function updateStudentCourse(data) {
  return request({
    url: '/studentCourse/studentCourse',
    method: 'put',
    data: data
  })
}
// 修改我要选课【退课】
export function deUpdateStudentCourse(data) {
  return request({
    url: '/studentCourse/studentCourse/exit',
    method: 'put',
    data: data
  })
}

// 删除我要选课
export function delStudentCourse(id) {
  return request({
    url: '/studentCourse/studentCourse/' + id,
    method: 'delete'
  })
}
